package string;

public class ReplaceAllDemo {
    public static void main(String[] args) {
        String str = "abc123def456ghi";
        str = str.replaceAll("[a-z]","NUMBER");
        System.out.println(str);

        //和谐用语
        String regex = "(wqnmlgb|dsb|cnm|nc|nmsl|wrsndm|djb)";
        String message = "wqnmlgbdsb,你个dsb,我cnm";
        message = message.replaceAll(regex,"***");
        System.out.println(message);

    }
}
